<?php

require_once("config.php");

function getDBConnection()
{
	global $dbuser;
	global $dbpassword;
	global $dbhost;
	global $dbname;
	$db = mysqli_connect($dbhost, $dbuser, $dbpassword, $dbname);
	
	if (mysqli_connect_errno($db))
	{
		echo "Failed to connect to MySQL: " . mysqli_connect_error();
	}
	
	return $db;
}

?>